﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using NAudio.Wave;
using SimpleFMMatrix.DataStructures;

namespace SimpleFMMatrix.ViewModel
{
    public class SimpleFMMatrixViewModel : DependencyObject
    {
        public FMMatrix Matrix { get; private set; }
        public FMMatrixVM MatrixVM { get; private set; }
        public IWavePlayer Out { get; private set; }

        public SimpleFMMatrixViewModel()
        {
            Matrix = new FMMatrix();
            MatrixVM = new FMMatrixVM(Matrix);

            //Out = new WaveOut()
            //{
            //    NumberOfBuffers = 2,
            //    DesiredLatency = 200
            //};

            Out = new AsioOut();

            //Out = new DirectSoundOut(50);

            Out.Init(Matrix.WaveProvider);
            Out.Play();
        }
    }
}
